/*
 * Phase.h
 *
 *  Created on: 23 May 2011
 *      Author: allan
 */

#ifndef PHASE_H_
#define PHASE_H_

// C++ includes
#include <string>
#include <vector>
using namespace std;

class Phase
{
public:
	Phase();
	
	virtual ~Phase() = 0;
	
	void AddSpecies(string nameOfSpecies);
	
	void SetName(string nameOfPhase);
	
	void SetMolesOfSpecies(unsigned iSpecies, double value);
	
	void SetMolesOfSpecies(const vector<double>& moles);
	
	const string GetName() const;
	
	const unsigned GetNumOfSpecies() const;
	
	const unsigned GetIndexOfSpecies(string nameOfSpecies) const;
	
	const string GetNameOfSpecies(unsigned iSpecies) const;
	
	const double GetMolesOfSpecies(unsigned iSpecies) const;
	
	const double GetMolarFractionOfSpecies(unsigned iSpecies) const;
	
	const double GetTotalNumberOfMoles() const;
	
	virtual const vector<double> Activities(double T, double P) const = 0;
	
private:
	string nameOfPhase;
	
	vector<string> species;
	
	vector<double> moles;
	
	double totalNumberMoles;
};

#endif /* PHASE_H_ */
